﻿@model HomePageViewModel
@{
    ViewBag.Title= "职工列表";
}

<h1>职工列表</h1>

<table>
    <tr>
        <td>ID</td>
        <td>姓名</td>
        <td class="txt-left">操作</td>
    </tr>
    @foreach (var employee in Model.Employees)
    {
    <tr>
        <td>@employee.ID</td>
        <td>@employee.Name</td>
        <td class="txt-left">
            <a asp-action="Detail" asp-route-Id="@employee.ID">详情</a>
            &nbsp; 
            <a asp-controller="Home" asp-action="Edit" asp-route-id="@employee.ID">编辑</a>
        </td>
    </tr>
    }
</table>

<br/>
<p><a asp-action="Create" >新增员工</a></p>


